package com.fyl.datasource.context;

public class DataSourceContextHolder {

    private final static ThreadLocal<String> CONTEXT = new ThreadLocal<>();

    public static void putDataSourceKey(String name) {
        CONTEXT.set(name);
    }

    public static String getDataSourceKey() {
        return CONTEXT.get();
    }

    public static void clearDataSourceKey() {
        CONTEXT.remove();
    }
}

